# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        
        # Adding field 'Action.brew'
        db.add_column('brewing_action', 'brew', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['brewing.Brew']), keep_default=False)


    def backwards(self, orm):
        
        # Deleting field 'Action.brew'
        db.delete_column('brewing_action', 'brew_id')


    models = {
        'brewing.action': {
            'Meta': {'object_name': 'Action'},
            'action': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'brew': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['brewing.Brew']"}),
            'comments': ('django.db.models.fields.TextField', [], {}),
            'fermenter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['brewing.Container']"}),
            'gravity': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'when': ('django.db.models.fields.DateTimeField', [], {})
        },
        'brewing.brew': {
            'Meta': {'object_name': 'Brew'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['brewing.Recipe']"})
        },
        'brewing.container': {
            'Meta': {'object_name': 'Container'},
            'capacity': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'purchased_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
        },
        'brewing.ingredient': {
            'Meta': {'object_name': 'Ingredient'},
            'add_time': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'amount': ('django.db.models.fields.FloatField', [], {}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'substance': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['brewing.Substance']"}),
            'units': ('django.db.models.fields.CharField', [], {'max_length': '10'})
        },
        'brewing.recipe': {
            'Meta': {'object_name': 'Recipe'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'ingredient': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['brewing.Ingredient']", 'symmetrical': 'False'})
        },
        'brewing.substance': {
            'Meta': {'object_name': 'Substance'},
            'alpha_acid_percent': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'})
        }
    }

    complete_apps = ['brewing']
